package com.gxust.util;

/**
 *  用来存储用户id的静态方法类
 */
public class BaseContext {

    private static final ThreadLocal<Integer> userIdHolder = new ThreadLocal<>();

    public static Integer getUserId() {
        return userIdHolder.get();
    }

    public static void setUserId(Integer userId) {
        userIdHolder.set(userId);
    }

    public static void clearUserId() {
        userIdHolder.remove();
    }
}